The present invention relates to a method and apparatus for synchronizing function values in a multiple operating environment system and, in particular, for allowing a system operational unit that is providing shared system resources and is required to respond to or to execute protocols of a plurality of operating environments to maintain, recognize and respond to a different set of function values for each operating environment for each shared resource managed by the shared resource unit wherein the function values, for example, identify a shared resource or a user or to control an operation to be performed.
Many contemporary computer systems, such as multiple processor systems and networked systems, include shared resource units, such as file servers and processors, to allow system resources, such as data, programs and storage space and various functions or operations, to be shared among a plurality of users. Typical examples of shared resource units are file servers wherein a number of local or networked users or systems may share the file server to have common access to and share resources such as storage space, data and programs, or the shared processors of multiple processor systems wherein tasks are assigned to processors depending on availability, priority or processor functionality.
A recurring problem with such shared resources, however, is that the systems sharing a resource frequently execute different operating environments, such as UNIX and Microsoft Windows(trademark), and thereby communicate with the shared resource unit with different resource protocols, or may execute a number of different rescue protocols performing a similar or common function or operation within the same operating environment. In addition, the shared resource unit itself may be required to execute multiple operating environments in order to interoperate with the systems sharing that resource. As a result, not only must a shared resource unit respond to or execute multiple resource protocols, but the function values used to access a shared resource, that is, the names or identifiers used to identify and refer to a particular file, program, function, operation or user or to control the execution of a program, function or operation, will typically vary from operating environment to operating environment or from resource protocol to resource protocol, even though they are similar in function.
In the instance of a file server system, for example, a request for access to a given file will typically include the file name and an identifier of the requesting user or system. The file server will use the file name to locate and access file and the requester identification to determine the requester""s access rights to the file by comparing the requester identification with a file xe2x80x9cownerxe2x80x9d identification associated with the file, wherein an xe2x80x9cownerxe2x80x9d of a file is a user having access rights to the file. If, for example, the file request is submitted by a system executing UNIX and the Network File System (NFS) protocol, the requester identification will be in the form of a User Identifier (UID), which would require that the file server maintain xe2x80x9cownerxe2x80x9d identifications in the form of UIDs. If the file request is submitted by a system executing Microsoft Windows and the Common Internet File System (CIFS) protocol, the requester identification will be in the form of a Security Identifier (SID) and the file server would be required to maintain xe2x80x9cownerxe2x80x9d identifications in the form of SIDs. In this example, therefore, the system operational unit, that is, the file server, must respond to or execute two operating environments, UNIX and Windows, and respond to two protocols, NFS and CIFS, and must maintain and recognize two different but equivalent function values, UIDs and SIDs, that may be associated with each shared file.
It will be apparent that the requirement of maintaining, recognizing and responding to a different set of function values for each operating environment or resource protocol for each shared resource managed by a shared resource unit will result in such problems as increased cost and complexity and increased processing time with a resulting decrease in operating speed. In addition, it will be recognized that at the time of creation of or initial access to a system resource such as a program or data file, only the function values of the operating environment or resource protocol creating or initially accessing the system resource will be known and may be associated with the resource. As such, each subsequent access of the system resource initiated from a different operating environment or resource protocol will require additional processing time and resources to correlate the function values of each new environment with the resource. Also, errors may occur when, for example, a file server does not recognize the xe2x80x9cnamexe2x80x9d of a valid owner of a file when that name is submitted in a request from a different operating environment or resource protocol, or confuses an invalid xe2x80x9cowner namexe2x80x9d from one environment with a valid xe2x80x9cowner namexe2x80x9d from a different environment or protocol. Errors may also arise when the shared resource attempts to correlate function values from new environments or protocols with function values of previously known environments or protocols.
The present invention provides a solution to these and other problems of the prior art.
The present invention is directed to a method and mechanism for function value synchronization in a shared resource unit providing shared resources to a plurality of resource users submitting requests for shared resource operations in a plurality of protocols.
According to the present invention, the mechanism receives a request for a shared resource operation expressed in a protocol wherein the request contains a function value representing a primary value relating to a shared resource and a function value representing a related associated value that is related to the primary value and is used in performing the requested operation. A protocol interface and a resource manager parse the request to obtain the primary value and the related associated value, and a database generator determines whether a database contains a values entry corresponding to the primary value appearing in the request.
If the database does not contain a corresponding values entry, the database manager constructs a values entry in the database wherein each values entry includes a primary value field for storing a primary value and an associated value field for each protocol of the plurality of protocols, each associated value field for storing a related associated value of the corresponding protocol. The database manager constructs the values entry by obtaining the related associated value corresponding to the primary value received in the request and the protocol of the request, writing the primary value into the primary value field of the corresponding values entry, writing the related associated value into the associated value field corresponding to the request protocol, and writing a sentinel value into each remaining associated value field of the values entry.
The database manager then reads the associated value field corresponding to the protocol of the request from the values entry corresponding to the primary value, and if the value in the associated value field corresponding to the request protocol is a related associated value other than a sentinel value, compares the related associated value read from the associated value field corresponding to the request protocol to the related associated value received in the request and indicates a result of the comparison to a resource manager.
If the value in the associated value field corresponding to the request protocol is a sentinel value, the database manager queries a system administrative function with the primary value read from the corresponding values entry, receives from the system administrative function a related associated value corresponding to the primary value and to the protocol of the request, and writes the related associated value into the associated field of the values entry corresponding to the protocol of the request in replacement of the sentinel value. The database manager then compares the related associated value received in the request with the related associated value written into the associated value field corresponding to the protocol of the request and indicates the result of the comparison to the resource manager.
In a present implementation of the invention, the resource manager is a file server, the shared resources are files stored in the file server, the primary values are file identifiers, and the related associated values are file owner identifications.
The function value synchronization mechanism of the present invention may also perform partial or complete remappings of the functions values. According to the present invention, when the database manager determines that the remapping of function values is to be a partial remapping, the database manager initially identifies the associated fields containing the sentinel value and the corresponding primary values and, when the database manager determines that the remapping of function values is to be a complete remapping, the database manager writes the sentinel value into the associated fields of all the values entries. The database manager then identifies all associated fields containing the sentinel value, queries the system administrative functions with the primary values corresponding to all associated fields containing the sentinel value, receives from the system administrative functions the associated values corresponding to associated field containing the sentinel value and that are available, and writes the associated values received from the system administrative functions into the corresponding associated fields in replacement of the sentinel value.